<include file="../Public/_header" />
<script type="text/javascript" src="../Public/Js/Common.js" ></script>
<script>
$(document).ready(function(){
	photo_resize('.img_resize');
});
</script>

{:W('Weibo',array('tpl_name'=>$use_widget_share==1?'blog_create_weibo':'blog_share_weibo','button_title'=>'分享'))}

<php>
$tpl_data = array('author'=>getUserName($uid),'title'=>$title,'url'=>U('blog/Index/show',array('id'=>$id,'mid'=>$uid)));
$tpl_data = urlencode(serialize($tpl_data));
$param_data = urlencode(serialize(array('has_status'=>1,'is_success_status'=>1,'status_title'=>'发布成功')));
</php>

<php>if($use_widget_share == 1) {</php>
	<!-- 自动分享 -->
	<script>
	$(document).ready(function(){
		_widget_weibo_start('', '{$tpl_data}', '{$param_data}');
	});
	</script>
<php>} </php>

<div class="content no_bg"><!-- 内容 begin  -->
  <div class="main no_l"><!-- 画布 begin  -->
    <div class="mainbox">

    <include file="../Public/_right" />

    <div class="mainbox_C">
    <div class="person_info">
      <div class="userPic" ><space uid="uid" >{uavatar}</space></div>
      <div style="padding-left:70px;">
        <h2>
            <span class="right fn f12px"><a id="test" href="javascript:history.back( -1 )">返回上一页</a></span>
            <space uid="uid" class="null">{uname}</space> 的{$ts['app']['app_alias']}
        </h2>
		<p>
			<em>发布时间：{$cTime|friendlyDate}</em>
		<eq name="isOwner" value="1">
			 [ <a href="{:U('blog/Index/my', array('cateId'=>$category['id']))}">{$category_title}</a> ]
        </p>
        <p>
			<a href="{:U('blog/Index/my')}" >我的全部{$ts['app']['app_alias']}</a>
		<else/>
             [ <a href="{:U('blog/Index/personal', array('uid'=>$uid,'cateId'=>$category['id']))}">{$category['name']}</a> ]
        </p>
        <p>
			<a href="{:U('blog/Index/personal', array('uid'=>$uid))}" >{$uid|getUserName}的全部{$ts['app']['app_alias']}</a>
		</eq>
		</p>
      </div>
    </div>
    
    <div class="BlogBox">
      <div class="">
        <div class="btmline lh30 mLR15">
            <div class="right">
                <a href="{:U('blog/Index/show', array('id'=>$id, 'action'=>'lt', 'mid'=>$uid))}">上一篇</a> / <a href="{:U('blog/Index/show', array('id'=>$id, 'action'=>'gt', 'mid'=>$uid))}">下一篇</a>
            </div>
            第 {$num}/{$count} 篇{$ts['app']['app_alias']}
        </div>
        <div style="margin-bottom:20px; " class="mLR15">
          <div class="tit_log">
            <h1>
                <span class="right">
                <input type="button" name="Submit" value="分享" class="BtnShare" onclick="_widget_weibo_start('', '{$tpl_data}');" id="BtnShare_{$id}"/>
                </span><strong>{$title}</strong>
            </h1>
            <p>
                <eq name="isOwner" value="1">
                <a href="{:U('blog/Index/edit', array('id'=>$id, 'mid'=>$uid))}">编辑</a>&nbsp;&nbsp;
                <span class="cGray2">|</span>&nbsp;&nbsp;
                <a href="javascript:deleteBlog('{:U('blog/Index/doDeleteBlog', array('id'=>$id))}')">删除</a>&nbsp;&nbsp;
                </eq>
            </p>
          </div>
          <php>if( $isOwner == 0 && $private == 2 ){</php>
          <div class="bg_msg">
            <div class="bg_msg_btm">
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="40" align="center"><img src="../Public/images/ico_suo.png" width="20" height="20" /></td>
                  <td>只有主人可以查看此日志</td>
                </tr>
              </table>
            </div>
          </div>
          <php>}else if($isOwner == 0 && $private == 3){</php>
          <div class="bg_msg">
            <div class="bg_msg_btm">
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="40" align="center"><img src="../Public/images/ico_yaoshi.png" width="20" height="20" /></td>
                  <td colspan="3">本日志需要密码才能访问</td>
                </tr>
                <form method="post" action="">
                  <tr>
                    <td height="50" align="center">&nbsp;</td>
                    <td width="37">密码:</td>
                    <td width="140"><input name="password" type="password" class="text" id="title" onfocus="this.className='text2'" onblur="this.className='text'" size="20" maxlength="30"/></td>
                    <td width="71"><input type="submit" value="确定" class="btn_b"/></td>
                  </tr>
                </form>
              </table>
            </div>
          </div>
          <php>}elseif( $isOwner == 0 && $private == 1 && false == $isFriend){</php>
          <div class="bg_msg">
            <div class="bg_msg_btm">
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="40" align="center"><img src="../Public/images/ico_suo.png" width="20" height="20" /></td>
                  <td>只有主人的好友可以查看此日志</td>
                </tr>
              </table>
            </div>
          </div>
          <php>}else{</php>
            <div style="padding:20px 0px;" class="f14px blog_con lh180 " id="blog_con"><div class="ke-post img_resize">{$content}</div></div>
            <neq name="mTime" value="0"><div class="cGray2 lh30">最后修改时间: {$mTime|friendlyDate}</div></neq>
          <php>} </php>
          
        </div>
        <div>{:W('Comment',array('type'=>'blog','appid'=>$id, 'author_uid'=>$uid, 'title'=>$title, 'url'=>U('blog/Index/show',array('id'=>$id,'mid'=>$uid)), 'table'=>'blog','id_field'=>'id','comment_count_field'=>'commentCount'))}</div>
      </div>
    </div>
    <div class="c"></div>
    </div>
    </div>
  </div>
  <div class="c"></div>
</div>
<include file="../Public/_footer" />